//默认值维护频道的数据
const initalState = {
  list: [], //频道列表
  activeId: 0, //频道当前选中ID的数据
}
export const channel = (state = initalState, action) => {
  //console.log(action)
  //执行获取频道数据命令
  if (action.type === 'channel/get') {
    return {
      ...state,
      list: action.listtt,
    }
  }
  //执行切换频道高亮命令
  if (action.type === 'channel/active') {
    return {
      ...state,
      activeId: action.itemIdd,
    }
  }

  return state
}
